package com.cloudcross.ssp.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.cloudcross.ssp.base.service.BaseService;
import com.cloudcross.ssp.common.utils.Pager;
import com.cloudcross.ssp.model.Account;
import com.cloudcross.ssp.model.ClientAccount;
import com.cloudcross.ssp.model.Resources;
import com.cloudcross.ssp.pulgin.mybatis.plugin.PageView;

public interface IAccountService extends BaseService<Account> {
    Account querySingleAccount(String accountName);

    Account isExist(String accountName);

    String queryIconPathById(int id);

    /**
     * 验证用户登陆
     * 
     * @author wuqiang.du Email：mmm333zzz520@163.com date：2014-2-25
     * @param Account account
     * @return
     */
    boolean addAccount(Account account);

    boolean addAccountOperator(Account account);

    boolean addAccountAdvertiser(Account account);

    Account countAccount(Account account);

    /**
     * @param account
     * @param pageView
     * @return
     */
    PageView queryNoMatch(Account account, PageView pageView);

    boolean updateState(List<Long> idList, int status);

    boolean editAccount(Account t);

    List<Account> findExcelAccounts(HashMap<String, Object> paramMap);

    int countByParamsOperator(Map<String, Object> paramMap);

    int countByParamsAdvertiser(Map<String, Object> paramMap);

    List<Account> findByParamsOperator(Map<String, Object> paramMap, Pager pager);

    List<Account> findByParamsAdvertiser(Long advertiserId);

    boolean editAccountOperator(Account t);

    boolean editAccountAdvertiser(Account t);

    List<Account> findExcelAccountsAdvertiser(HashMap<String, Object> paramMap);

    List<Account> findExcelAccountsOperator(HashMap<String, Object> paramMap);

    // 权限管理zj
    int queryAccountCountByCondition(Map<String, Object> condition);

    List<Account> queryAccountByCondition(Map<String, Object> condition, Pager pager);

    boolean insertAccount(Account account);

    boolean updateAccount(Account account);

    Account queryAccountById(Long id);

    // 客户端账号管理数据数目
    int queryClientAccountCountByCondition(Map<String, Object> condition);

    // 客户端账号管理数据
    List<ClientAccount> queryClientAccountByCondition(Map<String, Object> condition, Pager pager);

    //根据角色查找权限
    List<Resources> findRolesResources(Long roleId);

}
